<html lang="en" class="login-content" data-ng-app="materialAdmin">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="Generator" content="EditPlus®">
    <meta name="Author" content="">
    <meta name="Keywords" content="">
    <meta name="Description" content="">
    <title>Material Admin</title>
    <link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
    <!-- Vendor CSS -->
    <link href="/login/css/material-design-iconic-font/css/material-design-iconic-font.min.css" rel="stylesheet" type="text/css">
    <!-- CSS -->
    <link href="/login/css/app.min.1.css" rel="stylesheet" type="text/css">
    <link href="/xtiper_css/xtiper.css" rel="stylesheet" type="text/css"/>
    <style type="text/css">

        /* SELECT W/IMAGE */
        select#selectTravelCity
        {
            width                    : 14em;
            height                   : 2.5em;
            padding                  : 0.2em 0.4em 0.2em 0.4em;
            vertical-align           : middle;
            border                   : 3px solid #94c1e7;
            -moz-border-radius       : 0.2em;
            -webkit-border-radius    : 0.2em;
            border-radius            : 0.2em;
            -webkit-appearance       : none;
            -moz-appearance          : none;
            appearance               : none;
            background               : #ffffff;
            font-family              : SimHei;
            font-size                : 1.1em;
            color                    : RGBA(102,102,102,0.7);
            cursor                   : pointer;
            margin-right: 150px;
        }
    </style>
</head>
<body class="login-content" data-ng-controller="loginCtrl as lctrl">
<span id="vuebox">
	 <!--登录-->
 <div class="lc-block" id="l-login" data-ng-class="{'toggled':lctrl.login === 1}">
	 <h1 class="lean">登录</h1>

	 <div class="input-group m-b-20">
    		<span class="input-group-addon">
    			<i class="zmdi zmdi-account"></i>
    		</span>
		 <div class="fg-line">
			 <input type="text" class="form-control" v-model="userlogin.username" placeholder="请输入您的登录账号" regex="^\w{3,16}$"/>
		 </div>
	 </div>

	 <div class="input-group m-b-20">
    		<span class="input-group-addon">
    			<i class="zmdi zmdi-male"></i>
    		</span>
		 <div class="fg-line">
			 <input type="password" class="form-control" v-model="userlogin.password" placeholder="请输入您的登录密码" regex="^\w+"/>
		 </div>
	 </div>

	 <div class="clearfix"></div>

     <!--登录按钮-->
	 <button  @click="UserLogin()" class="btn btn-login btn-danger btn-float">
		 <i class="zmdi zmdi-arrow-forward"></i>
	 </button>

	 <ul class="login-navigation">
		 <li class="bgm-red" @click="clearuser()" data-ng-click="lctrl.login = 0; lctrl.register = 1">忘记密码</li>
	 </ul>
 </div>

 </span>
</body>
<script src="/login/js/bower_components/jquery/dist/jquery.min.js"></script>
<script src="/login/js/log.js"></script>
<!-- Angular -->
<script src="/login/js/bower_components/angular/angular.min.js"></script>
<script src="/login/js/bower_components/angular-resource/angular-resource.min.js"></script>
<script src="/login/js/bower_components/angular-animate/angular-animate.min.js"></script>
<!-- Angular Modules -->
<script src="/login/js/bower_components/angular-ui-router/release/angular-ui-router.min.js"></script>
<script src="/login/js/bower_components/angular-loading-bar/src/loading-bar.js"></script>
<script src="/login/js/bower_components/oclazyload/dist/ocLazyLoad.min.js"></script>
<script src="/login/js/bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
<!-- Common js -->
<script src="/login/js/bower_components/angular-nouislider/src/nouislider.min.js"></script>
<script src="/login/js/bower_components/ng-table/dist/ng-table.min.js"></script>
<!-- Placeholder for IE9 -->
<!--[if IE 9 ]>
<script src="/login/js/bower_components/jquery-placeholder/jquery.placeholder.min.js"></script>
<![endif]-->
<!-- App level -->
<script src="/login/js/app.js"></script>
<script src="/login/js/controllers/main.js"></script>
<script src="/login/js/controllers/ui-bootstrap.js"></script>
<!-- Template Modules -->
<script src="/login/js/modules/form.js"></script>
<script src="/xtiper_js/xtiper.js"></script>
<script src="/webjars/vue/2.6.10/dist/vue.js"></script>
<script src="/webjars/axios/0.19.0/dist/axios.min.js"></script>
<script type="text/javascript">
    var vm1=new Vue({
        el:"#vuebox",
        data:{
			userlogin:{username:'',password:''}
        },
		methods:{
            UserLogin:function () {
				if (this.userlogin.username==''){
				    xtip.msg('请输入用户名',{icon:'w'})
					return false;
				}
				if (this.userlogin.password==''){
				    xtip.msg("请输入登录密码",{icon:'w'})
				}
				loadid=xtip.load('正在验证....')
				axios({
					url:"http://localhost:8083/system/login",
					method:"post",
					params:{username:this.userlogin.username,password:this.userlogin.password}
				}).then(res=>{
				    if(res.data.data.result=="success"){
				        xtip.msg("登录成功",{icon:'s'});
						xtip.close(loadid);
                        window.location.href='sys_index.html';
					}else {
				        xtip.msg("登录失败",{icon:'e'});
				        xtip.close(loadid)
					}
				})
            }
        }

    })
</script>
</html>